<%@ page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>社会保障卡财政补贴登记</title>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<script src="${pageContext.request.contextPath }/scripts/boot.js" type="text/javascript"></script>
		<style type="text/css">
#Layer1 {
	position: absolute;
	left: 20%;
	top: 94px;
	width: 628px;
	height: 325px;
	z-index: 1;
}
		</style>
	</head>

<body>

<div id="Layer1">
	<div style="width:100%;" align="center">
		  <div class="mini-toolbar" style="border-bottom:0;padding:0px;">
			    <table style="width:100%;">
			      <tr>
			        <td style="width:100%;text-align:center;"><font face="宋体"><strong>社会保障卡财政补贴登记</strong></font></td>
			      </tr>
			    </table>
		  </div>
	</div>
	<div >
	<form id="form1" method="post">
		<table style="width:100%;border:solid 1px #aaa;width:100%;" cellpadding="10" >
			<tr>
				<td style="width:15%;"></td>
				<td style="width:10%;white-space:nowrap;text-align: right;">制卡批次:</td>
				<td style="width:25%;text-align: left;"><input name="aaz001" class="mini-textbox" width="100%" emptyText="请输入以GR或者DW开头的十位制卡批次" maxLength="10"/></td>
				<td style="width:10%;white-space:nowrap;text-align: right;">到卡数量:</td>
				<td style="width:25%;text-align: left;"><input name="aaz748" class="mini-spinner" width="100%" emptyText="请输入到卡数量" /></td>
				<td style="width:15%;"></td>
			</tr>
			<tr>
				<td style="width:15%;"></td>
				<td  style="width:10%;white-space:nowrap;text-align: right;">是否补贴:</td>
				<td style="width:25%;text-align: left;"><input name="aaz747" class="mini-combobox" width="100%" data="[{id: 1, text: '是'}, {id: 2, text: '否'}]" emptyText="请选择是否补贴" /></td>
				<td style="width:10%;white-space:nowrap;text-align: right;">补贴时间:</td>
				<td style="width:25%;text-align: left;"><input name="aaz720" class="mini-datepicker" allowInput="false" width="100%" emptyText="请输入到卡时间" /></td>
				<td style="width:15%;"></td>
				<!-- 补贴操作人，补贴操作日期 -->
<input name="aaz749" class="mini-textbox" width="80%" value="<%=(String)session.getAttribute("userid") %>" visible="false"/>
<input name="aaz750" class="mini-datepicker" width="80%" visible="false"/>
			</tr>
			<tr>
						<td height="40" colspan="6" style="width:100%;text-align:center;">
							<a class="mini-button" onclick="onOk"   iconCls="icon-ok">确认</a> 
							<a class="mini-button" onclick="onReset"  iconCls="icon-remove">重置</a>
						</td>
					</tr>
		</table>
	</form>
	 </div>
</div>

<script type="text/javascript">
		mini.parse();
   		var form = new mini.Form("form1");
   		
   		var date = new Date();
   		mini.getbyName("aaz750").setValue(date);
   		
   		function UpdateData() {
            var o = form.getData();
            form.validate();
            if (form.isValid() == false){
            	return;
            }
            var aaz001 = mini.getbyName("aaz001").getValue().trim();
        	var flag = aaz001.substring(0,2);
        	if(flag != 'GR' && flag != 'DW'){
        		mini.alert("请输入以GR或者DW开头的十位制卡批次！")
        		return ;
           }
           var json = mini.encode([o]);
           $.ajax({
                  url: "${pageContext.request.contextPath}/Czbt.do?method=updateAZ15",
                  type: 'post',
                  data: { data: json},
                  cache: false,
                  success: function (text) {
                  	mini.alert("保存成功！");
                  	form.clear();
                  },
                  error: function (jqXHR, textStatus, errorThrown) {
                    mini.alert(jqXHR.responseText);
                    CloseWindow();
                  }
              });
        }
        
        function onOk(e) {
             UpdateData();
        }
   		
   		function onReset(e) {
        	 mini.getbyName("aaz001").setValue("");
        	 mini.getbyName("aaz748").setValue("");
        	 mini.getbyName("aaz747").setValue("");
        	 mini.getbyName("aaz720").setValue("");
    	}
   		
   		
</script>
	




</body>
</html>
